<extend name="Base/index"/>

<block name="body">
  <div class="shop">
    <div class="detail">
      <div class="head">
        <div class="container">
          <div class="row">
            <div class="col-xs-12">
              <div class="info clearfix">
                <span class="pull-left shop-logo">
                  <notempty name="data.logo">
                    <img src="{:get_image_thumb($data['logo'], 200, 200)}" alt="">
                  <else />
                    <img src="__IMG__/demo/logo-sm.png" alt="">
                  </notempty>
                </span>
                <div class="shop-desc">
                  <h1 class="title"><notempty name="meta_title">{$meta_title|get_short=12}<else/>{:C('WEB_SITE_TITLE')}</notempty></h1>
                  <p class="intro">{$data.intro}</p>
<!--                  <ul class="count clearfix">
                    <li>
                      <span href="" class="btn btn-sm">
                        <i class="icon icon-cart"></i>商品<span><gt name="data.items_num" value="0">({$data.items_num})</gt></span>
                      </span>
                    </li>
                    <li>
                      <span href="" class="btn btn-sm">
                        <i class="icon icon-form"></i>销量
                      </span>
                    </li>
                    <li>
                      <span href="" class="btn btn-sm">
                        <i class="icon icon-appreciate"></i>评价
                      </span>
                    </li>
                  </ul>-->
                  <div class="manage">
                    <if condition="$data.uid eq UID">
                      <a href="{:U('Shops/manage')}" class="btn btn-positive btn-tab" id="Z_shop_manage">店铺设置</a>
                    </if>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="container">
        <div class="row">
          <div class="col-xs-12">
              <div class="list-filter cate">
                  <dl class="dl-horizontal">
                      <dt>分类：</dt>
                      <foreach name="category" item="vo" key="k">
                          <dd class="abc">
                              <div class="clearfix J_search_list"> <span class="item {$cate_active[$vo['pid']][0]}"><a href="{:U('Shops/detail', array('cid' => $vo['pid'], 'uid'=>$uid, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => $_field, '_order' => $_order))}">全部</a></span>
                                  <foreach name="vo.item" item="val">
                        <span class="item {$cate_active[$vo['pid']][$val['id']]}">
                            <if condition="$k lt 2">
                                <a href="{:U('Shops/detail', array('cid' => $val['id'], 'uid'=>$uid, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => $_field, '_order' => $_order))}">{$val.name}</a>
                                <else />
                                <a href="{:U('Shops/detail', array('cid' => $val['id'], 'uid'=>$uid, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => $_field, '_order' => $_order,'item_label'=>$item_label))}">{$val.name}</a>
                            </if>
                        </span>
                                  </foreach>
                              </div>
                              <span class="more">更多&nbsp;<i class="icon icon-arrow-bottom"></i></span> </dd>
                      </foreach>
                  </dl>
              </div>
              <!-- 排序 -->
              <div class="list-filter sort">
                  <dl class="dl-horizontal">
                      <dd>
                          <a href="{:U('Shops/detail', array('cid' => $cid, 'uid'=>$uid, 'brand'=>$brand, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => 'is_top', '_order' => 'desc'))}" class="{$order_css['active']['is_top']['desc']}">推荐</a>
                          <a href="{:U('Shops/detail', array('cid' => $cid, 'uid'=>$uid, 'brand'=>$brand, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => 'viewnum', '_order' => 'desc'))}" class="{$order_css['active']['viewnum']['desc']}">人气</a>
                          <a href="{:U('Shops/detail', array('cid' => $cid, 'uid'=>$uid, 'brand'=>$brand, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => 'create_time', '_order' => 'desc'))}" class="{$order_css['active']['create_time']['desc']}">新品</a>
                          <a href="{:U('Shops/detail', array('cid' => $cid, 'uid'=>$uid, 'brand'=>$brand, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => 'buynum', '_order' => 'desc'))}" class="{$order_css['active']['buynum']['desc']}">销量</a>
                          <a href="{:U('Shops/detail', array('cid' => $cid, 'uid'=>$uid, 'brand'=>$brand, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => 'price', '_order' => 'desc'))}" class="{$order_css['active']['price']['desc']}">价格从高到低</a>
                          <a href="{:U('Shops/detail', array('cid' => $cid, 'uid'=>$uid, 'brand'=>$brand, 'prop'=>$prop, 'label' => $label, 'keyword' => $keyword, '_field' => 'price', '_order' => 'asc'))}" class="{$order_css['active']['price']['asc']}">价格从低到高</a> </dd>
                  </dl>
              </div>
            <!-- 店铺商品列表 -->
            <div class="item-title">
              <h3><a class="clearfix" href="/Item/search/cid/1.html">精选优品</a></h3>
            </div>
            
            <notempty name="lists">
              <div class="row item-list" id="J_item_list">
                <include file="Item/itemList"/>
              </div>
              <div class="page">
                {$_page}
              </div>
            <else/>
              <p class="list-empty">
                暂无商品！<br>
                <a href="{:U('Item/search')}" class="btn btn-positive">去看看别的</a>
              </p>
            </notempty>
            
          </div>
        </div>
      </div>
    </div>
  </div>
</block>
<block name="script">
  <script>
    seajs.use('common');
  </script>
</block>